var status = -1;
var selectionLog = [];

function action(d, h, j) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = j;
    var c = -1;
    if (status <= c++) {
        cm.dispose()
    } else {
        if (status === c++) {
            var g = ["mirrorD_323_0_", "mirrorD_323_1_", "mirrorD_323_2_", "mirrorD_323_3_"];
            var a = [0, 0, 0, 0];
            var b = ["生产射手村特产品蘑菇的蘑菇山丘。", "全身由石头组成的石头人的领地。", "能一眼看到蓝天碧海的金色海滩。", "树影之间躲藏着凶恶青龙的沉睡森林之底。"];
            var f = new Array();
            var e = 41800 + parseInt((cm.getMapId() - 320000000) / 1000000) * 4 - 4;
            for (var c = 0; c < b.length; c++) {
                if (cm.getNumberFromQuestInfo(e + c, "count") > 0) {
                    f.push(b[c] + "\n\n通关次数:" + cm.getNumberFromQuestInfo(e + c, "count") + "\r\n最短纪录:" + cm.getNumberFromQuestInfo(e + c, "min") + "分 " + cm.getNumberFromQuestInfo(e + c, "sec") + "秒")
                } else {
                    f.push(b[c] + "\n\n通关次数:- \r\n最短纪录:-分 -秒")
                }
            }
            if (cm.getQuestStatus(40202) > 0) {
                g.push("map323090100");
                a.push(0);
                f.push("可以和龙神安静聊天的射手村三岔路。")
            }
            if (cm.getQuestStatus(40923) > 0) {
                g.push("map323090200");
                a.push(0);
                f.push("关着拉尔汉的洞穴所在的北部林间路。")
            }
            cm.setMirrorDungeonInfo(g, a, f);
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};